package com.example.dyxeapplication.content.menu.alfabet.hand;

import com.example.dyxeapplication.R;
import com.example.dyxeapplication.content.menu.alfabet.Alfabet;
import com.example.dyxeapplication.content.menu.alfabet.ear.Ear;
import com.example.dyxeapplication.content.menu.alfabet.eye.Eye;
import com.example.dyxeapplication.content.menu.alfabet.lips.Lips;
import com.example.dyxeapplication.menu.Menu;
import com.example.dyxeapplication.setting.temp;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

public class Hands extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.hand);

		Button eye = (Button) findViewById(R.id.iconeye);
		Button hand = (Button) findViewById(R.id.iconhand);
		Button ear = (Button) findViewById(R.id.iconear);
		Button lips = (Button) findViewById(R.id.iconlips);
		
		ImageView imgview = (ImageView) findViewById(R.id.recHandBesar);
		
		if (temp.huruf.equals("a")) {
			imgview.setImageResource(R.drawable.hand_a);
			
			
		} else if (temp.huruf.equals("b")) {
			imgview.setImageResource(R.drawable.hand_b);
			
		}else if (temp.huruf.equals("c")) {
			imgview.setImageResource(R.drawable.hand_c);
			
		}else if (temp.huruf.equals("d")) {
			imgview.setImageResource(R.drawable.hand_d);
			
		}else if (temp.huruf.equals("e")) {
			imgview.setImageResource(R.drawable.hand_e);
			
		}else if (temp.huruf.equals("f")) {
			imgview.setImageResource(R.drawable.hand_f);
			
		}else if (temp.huruf.equals("g")) {
			imgview.setImageResource(R.drawable.hand_g);
			
		}else if (temp.huruf.equals("h")) {
			imgview.setImageResource(R.drawable.hand_h);
			
		}else if (temp.huruf.equals("i")) {
			imgview.setImageResource(R.drawable.hand_i);
			
		}else if (temp.huruf.equals("j")) {
			imgview.setImageResource(R.drawable.hand_j);
			
		}else if (temp.huruf.equals("k")) {
			imgview.setImageResource(R.drawable.hand_k);
			
		}else if (temp.huruf.equals("l")) {
			imgview.setImageResource(R.drawable.hand_l);
			
		}else if (temp.huruf.equals("m")) {
			imgview.setImageResource(R.drawable.hand_m);
			
		}else if (temp.huruf.equals("n")) {
			imgview.setImageResource(R.drawable.hand_n);
			
		}else if (temp.huruf.equals("o")) {
			imgview.setImageResource(R.drawable.hand_o);
			
		}else if (temp.huruf.equals("p")) {
			imgview.setImageResource(R.drawable.hand_p);
			
		}else if (temp.huruf.equals("q")) {
			imgview.setImageResource(R.drawable.hand_q);
			
		}else if (temp.huruf.equals("r")) {
			imgview.setImageResource(R.drawable.hand_r);
			
		}else if (temp.huruf.equals("s")) {
			imgview.setImageResource(R.drawable.hand_s);
			
		}else if (temp.huruf.equals("t")) {
			imgview.setImageResource(R.drawable.hand_t);
			
		}else if (temp.huruf.equals("u")) {
			imgview.setImageResource(R.drawable.hand_u);
			
		}else if (temp.huruf.equals("v")) {
			imgview.setImageResource(R.drawable.hand_v);
			
		}else if (temp.huruf.equals("w")) {
			imgview.setImageResource(R.drawable.hand_w);
			
		}else if (temp.huruf.equals("x")) {
			imgview.setImageResource(R.drawable.hand_x);
			
		}else if (temp.huruf.equals("y")) {
			imgview.setImageResource(R.drawable.hand_y);
			
		}else if (temp.huruf.equals("z")) {
			imgview.setImageResource(R.drawable.hand_z);
			
		}
		

		eye.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent i = new Intent(Hands.this, Eye.class);
				i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
				startActivity(i);
			}
		});
		
		hand.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent i = new Intent(Hands.this, Hands.class);
				i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
				startActivity(i);
			}
		});
		
		ear.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent i = new Intent(Hands.this, Ear.class);
				i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
				startActivity(i);
			}
		});
		
		lips.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent i = new Intent(Hands.this, Lips.class);
				i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
				startActivity(i);
			}
		});
	}
	
	
	@Override
	public void onBackPressed() {
		Intent myIntent = new Intent(this, Alfabet.class);
		myIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		startActivity(myIntent);
	}
	
	public void home(View v){
		Intent myIntent = new Intent(this, Menu.class);
		myIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		startActivity(myIntent);
	}
}